gdk: Remove GdkWindow.depth member variable
authorBenjamin Otte <otte@redhat.com>
Thu, 27 Oct 2016 14:24:42 +0000 (16:24 +0200)
committerBenjamin Otte <otte@redhat.com>
Fri, 28 Oct 2016 03:22:32 +0000 (05:22 +0200)
It's unused.

gdk/broadway/gdkwindow-broadway.c
gdk/gdkinternals.h
gdk/gdkwindow.c
gdk/wayland/gdkwindow-wayland.c
gdk/x11/gdkwindow-x11.c

index 9044144a1cc38c776db1e1be403caecc12a7a557..2dff60affd313c94d01be77366b8cf9392b26172 100644 (file)
@@ -220,7 +220,6 @@ _gdk_broadway_screen_init_root_window (GdkScreen * screen)
   impl->id = 0;
 
   window->window_type = GDK_WINDOW_ROOT;
-  window->depth = 24;
 
   window->x = 0;
   window->y = 0;
index 4a6396701dacd03b19b53d6a4751e9dd938fea5f..f9951cdb19ac4179389564e86ae06ad70849bb3c 100644 (file)
@@ -167,7 +167,6 @@ struct _GdkWindow
   GdkEventMask event_mask;
   guint8 window_type;
 
-  guint8 depth;
   guint8 resize_count;
 
   gint8 toplevel_window_type;
index 2b32b714f59769bfb85277bd0f91c357b632b9b6..35eb40e15c967a1535ba365d52f7894b6d10c6fc 100644 (file)
@@ -1240,11 +1240,9 @@ gdk_window_new (GdkWindow     *parent,
   if (attributes->wclass == GDK_INPUT_OUTPUT)
     {
       window->input_only = FALSE;
-      window->depth = window->visual->depth;
     }
   else
     {
-      window->depth = 0;
       window->input_only = TRUE;
     }
 
index a714b18ac42d190f210158d78b57d0e67f5f235f..b33c67ac6470e90d8cd190fa91419b806c83386f 100644 (file)
@@ -376,7 +376,6 @@ _gdk_wayland_screen_create_root_window (GdkScreen *screen,
   cairo_surface_set_device_scale (impl->staging_cairo_surface, impl->scale, impl->scale);
 
   window->window_type = GDK_WINDOW_ROOT;
-  window->depth = 32;
 
   window->x = 0;
   window->y = 0;
index 52dfd84608e4fbf7b185ac7cfc3b50585cffe3a3..f6c49cdc8516a7852452d8dde1a48ee400c28ee6 100644 (file)
@@ -641,7 +641,6 @@ _gdk_x11_screen_init_root_window (GdkScreen *screen)
   impl->window_scale = x11_screen->window_scale;
   
   window->window_type = GDK_WINDOW_ROOT;
-  window->depth = DefaultDepthOfScreen (x11_screen->xscreen);
 
   window->x = 0;
   window->y = 0;
@@ -915,6 +914,7 @@ _gdk_x11_display_create_window_impl (GdkDisplay    *display,
 
   unsigned int class;
   const char *title;
+  int depth;
 
   display_x11 = GDK_X11_DISPLAY (display);
   xparent = GDK_WINDOW_XID (real_parent);
@@ -978,10 +978,14 @@ _gdk_x11_display_create_window_impl (GdkDisplay    *display,
 
           impl->override_redirect = TRUE;
         }
+
+      depth = visual->depth;
     }
   else
     {
       class = InputOnly;
+
+      depth = 0;
     }
 
   if (window->width * impl->window_scale > 32767 ||
@@ -1002,7 +1006,7 @@ _gdk_x11_display_create_window_impl (GdkDisplay    *display,
                              (window->x + window->parent->abs_x) * impl->window_scale,
                              (window->y + window->parent->abs_y) * impl->window_scale,
                              window->width * impl->window_scale, window->height * impl->window_scale,
-                             0, window->depth, class, xvisual,
+                             0, depth, class, xvisual,
                              xattributes_mask, &xattributes);
 
   g_object_ref (window);
@@ -1159,8 +1163,6 @@ gdk_x11_window_foreign_new_for_display (GdkDisplay *display,
     win->state = 0;
   win->viewable = TRUE;
 
-  win->depth = attrs.depth;
-
   g_object_ref (win);
   _gdk_x11_display_add_window (display, &GDK_WINDOW_XID (win), win);